import request from "../../request";

const baseUrl = (id) => {
  return `/admin/category` + (id ? `/${id}` : '')
}

export const AdminGoodsCategoryList = (params) => {
  return request.get(baseUrl(), params)
}

export const AdminGoodsCategoryInfo = (id, params) => {
  return request.get(baseUrl(id), params)
}

export const AdminGoodsCategoryPost = (data) => {
  return request.post(baseUrl(), data)
}

export const AdminGoodsCategoryPut = (id, data) => {
  return request.put(baseUrl(id), data)
}

export const AdminGoodsCategoryDel = (id) => {
  return request.delete(baseUrl(id))
}

